<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>看点咨询平台</title>
    <link rel="stylesheet" href="./css/index.css">
    <link rel="stylesheet" href="https://at.alicdn.com/t/font_2541316_eegxb3txgn7.css">
    <link rel="stylesheet" href="./css/category.css">
    <link rel="stylesheet" href="./css/zTree_v3/css/demo.css">
    <link rel="stylesheet" href="./css/zTree_v3/css/zTreeStyle/zTreeStyle.css">
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="./css/jquery.sPage.css">
    <link rel="stylesheet" href="./css/article.css">
    <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.13.0/css/all.min.css" rel="stylesheet">
    <link rel="stylesheet" href="./css/foundation-datepicker.css">
    <link rel="stylesheet" href="./css/FraUpload.css">
    <link rel="stylesheet" href="./css/lc_switch.css">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_2032812_5x4in4ovij5.css">
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
    <script src="./js/index.js"></script>
    <script src="./js/ajax.js"></script>
    <script src="./css/zTree_v3/js/jquery.ztree.core.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.4.1/js/bootstrap.min.js"></script>
    <script src="./js/jquery.sPage.js"></script>
    <script src="./js/foundation-datepicker.js"></script>
    <script src="./js/FraUpload.js"></script>
    <script src="./js/MD5.js"></script>
    <script src="./js/Sortable/Sortable.min.js"></script>
    <script src="./js/editor.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/echarts/4.7.0/echarts.min.js"></script>
    <script>
        $(function() {
            var token = localStorage.getItem('token');
            // 通过判断有无token，识别用户是否登录，如果没有直接跳转到登录
            if(token) {
                $.ajax({
                    url: 'http://127.0.0.1:7788/user/info?token=' + token,
                    method: 'GET',
                    headers: {
                        'Authorization': token
                    },
                    success: function(res) {
                        $('#userFace').prop('src', res.data.userFace);
                    }
                })
            } else {
                alert('请先登录！');
                location.href = 'http://127.0.0.1:5500/login.html';
            }
        })
    </script>
</head>
<body>
    <div class="wrapper">
        <div class="left">
            <div class="left-header">
                <img src="./image/logo.png" alt="">
                <span>看点资讯精选</span>
            </div>
            <div class="left-nav">
                <ul>
                    <li><i class="iconfont icon-shouye"></i><span>首页</span></li>
                    <li><i class="iconfont icon-lanmu"></i><span>栏目管理</span></li>
                    <li><i class="iconfont icon-icon_A"></i><span>文章管理</span></li>
                    <li><i class="iconfont icon-weibiaoti2fuzhi12"></i><span>用户管理</span></li>
                    <li><i class="iconfont icon-pinglun"></i><span>评论管理</span></li>
                </ul>
            </div>
        </div>
        <div class="right">
            <div class="right-head">
                <div style='text-align: right;'><img id="userFace" src="./image/logo.png" alt=""></div>
            </div>
            <div class="right-content">
                
            </div>
        </div>
    </div>
</body>
</html>